package day_240507.e4;

public class e4_2 {
    static int count;

    public static void main(String[] args) {
        for (int n = 2; n <= 100; n++) {
            boolean isPrime = true;
            for (int i = 2; i <= Math.sqrt(n); i++) {
                if (n % i == 0) {
                    isPrime = false;
                    break;
                }
            }
            if (isPrime) {
                System.out.print(n + "\t");
                count++;
            }
        }
        System.out.println("\n质数共有：" + count);
    }
}